package com.online_video.entity;

import java.io.Serializable;
import java.util.Objects;

public class Video implements Serializable {
    private static  final long serialVersionUID = 121L;
    //视频id
    private Integer vid;
    //视频名称
    private String viName;
    //用户id
    private Integer u_id;
    //播放量
    private Integer playAmount;
    //视频分类
    private String category;
    //视频点赞
    private long like;
    //视频收藏
    private long collect;
    //视频上传日期
    private String date;
    //视频地址
    private String videoPath;
    //视频的封面
    private String img;
    //视频描述
    private String describe;


    public String getVideoPath() {
        return videoPath;
    }

    public void setVideoPath(String videoPath) {
        this.videoPath = videoPath;
    }

    public Integer getPlayAmount() {
        return playAmount;
    }

    public void setPlayAmount(Integer playAmount) {
        this.playAmount = playAmount;
    }

    @Override
    public String toString() {
        return "Video{" +
                "vid=" + vid +
                ", viName='" + viName + '\'' +
                ", u_id=" + u_id +
                ", playAmount=" + playAmount +
                ", category='" + category + '\'' +
                ", like=" + like +
                ", collect=" + collect +
                ", date=" + date +
                ", videoPath='" + videoPath + '\'' +
                ", img='" + img + '\'' +
                ", describe='" + describe + '\'' +
                '}';
    }

    public Video(Integer vid, String viName, Integer u_id, Integer playAmount, String category, long like, long collect, String date, String videoPath, String img, String describe) {
        this.vid = vid;
        this.viName = viName;
        this.u_id = u_id;
        this.playAmount = playAmount;
        this.category = category;
        this.like = like;
        this.collect = collect;
        this.date = date;
        this.videoPath = videoPath;
        this.img = img;
        this.describe = describe;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Video)) return false;
        Video video = (Video) o;
        return Objects.equals(getVid(), video.getVid());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getVid());
    }

    public Integer getVid() {
        return vid;
    }

    public void setVid(Integer vid) {
        this.vid = vid;
    }

    public String getViName() {
        return viName;
    }

    public void setViName(String viName) {
        this.viName = viName;
    }

    public Integer getU_id() {
        return u_id;
    }

    public void setU_id(Integer u_id) {
        this.u_id = u_id;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public long getLike() {
        return like;
    }

    public void setLike(long like) {
        this.like = like;
    }

    public long getCollect() {
        return collect;
    }

    public void setCollect(long collect) {
        this.collect = collect;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Video() {
    }


}
